home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _F377EFA461E647068036FEF11FF71ECF < prev    next >
Encoding:
Text File  |  2004-01-06  |  2.6 KB  |  73 lines

  1. --------------------------------------------------
  2. --    Created By: Petar
  3.  
  4.  
  5. AIBehaviour.ModMorphCloaked = {
  6.     Name = "ModMorphCloaked",
  7.  
  8.  
  9.     ---------------------------------------------
  10.     OnPlayerSeen = function( self, entity, fDistance )
  11.     end,
  12.     ---------------------------------------------
  13.     OnPlayerAiming =  function( self, entity, fDistance )
  14.     end,
  15.     ---------------------------------------------
  16.     OnEnemyMemory = function( self, entity )
  17.         -- called when the enemy can no longer see its foe, but remembers where it saw it last
  18.     end,
  19.     ---------------------------------------------
  20.     OnInterestingSoundHeard = function( self, entity )
  21.         -- called when the enemy hears an interesting sound
  22.     end,
  23.     ---------------------------------------------
  24.     OnThreateningSoundHeard = function( self, entity )
  25.         -- called when the enemy hears a scary sound
  26.     end,
  27.     ---------------------------------------------
  28.     OnReload = function( self, entity )
  29.         -- called when the enemy goes into automatic reload after its clip is empty
  30.     end,
  31.     ---------------------------------------------
  32.     OnGroupMemberDied = function( self, entity )
  33.         -- called when a member of the group dies
  34.     end,
  35.     ---------------------------------------------
  36.     OnNoHidingPlace = function( self, entity, sender )
  37.         -- called when no hiding place can be found with the specified parameters
  38.     end,    
  39.     ---------------------------------------------
  40.     OnReceivingDamage = function ( self, entity, sender)
  41.         --AI:DeCloak(entity.id);
  42.         entity:GoVisible();
  43.         entity:SelectPipe(0,"morpher_attack_wrapper");
  44.     end,
  45.     --------------------------------------------------
  46.     OnBulletRain = function ( self, entity, sender)
  47.         -- called when the enemy detects bullet trails around him
  48.     end,
  49.     --------------------------------------------------
  50.     OnCloseContact = function ( self, entity, sender)
  51. --        local rnd=random(1,5);
  52. --        AI:DeCloak(entity.id);
  53.         entity:GoVisible();
  54.         entity:SelectPipe(0,"morpher_attack_wrapper");
  55.         if (entity.MELEE_ANIM_COUNT) then
  56.             local rnd = random(1,entity.MELEE_ANIM_COUNT);
  57.             local melee_anim_name = format("attack_melee%01d",rnd);
  58.             entity:InsertAnimationPipe(melee_anim_name,3);
  59.         else
  60.             Hud:AddMessage("==================UNACCEPTABLE ERROR====================");
  61.             Hud:AddMessage("Entity "..entity:GetName().." made melee attack but has no melee animations.");
  62.             Hud:AddMessage("==================UNACCEPTABLE ERROR====================");
  63.         end
  64.     end,
  65.     --------------------------------------------------
  66.     CHASE_TARGET = function ( self, entity, sender)
  67. --        AI:DeCloak(entity.id);
  68.         entity:GoVisible();
  69.         entity:SelectPipe(0,"mutant_run_to_target");
  70.     end,
  71.  
  72.  
  73. }